Skip to content

x402 base payment cleanup#160

Merged
adambalogh merged 3 commits intomainfrom
ani/v2-cleanup
Feb 17, 2026
Merged

x402 base payment cleanup#160
adambalogh merged 3 commits intomainfrom
ani/v2-cleanup

Conversation

@dixitaniket
Copy link
Collaborator

No description provided.

@adambalogh adambalogh changed the title [WIP] x402 base payment cleanup x402 base payment cleanup Feb 17, 2026
@adambalogh adambalogh requested a review from Copilot February 17, 2026 18:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates the x402 payment system by removing the old v1 protocol and network selection, standardizing on x402v2 with Base Testnet (eip155:84532) as the only supported network.

Changes:

  • Removed x402v1 protocol support and x402Network enum
  • Consolidated LLM server URLs to single endpoints (llm.opengradient.ai)
  • Deleted x402_auth.py module and removed network parameter from all LLM functions
  • Updated dependencies to use only og-test-v2-x402==0.0.9

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/opengradient/types.py Removed x402Network enum that allowed switching between og-evm and base-testnet
src/opengradient/defaults.py Consolidated duplicate V1/V2 LLM server URLs and removed network filter default
src/opengradient/client/x402_auth.py Deleted entire file containing X402Auth class for v1 protocol
src/opengradient/client/llm.py Removed v1 imports, network parameter, and old make_request() implementations; standardized on make_request_v2() with x402v2 client
src/opengradient/cli.py Removed --network CLI option and x402Networks dictionary
requirements.txt Removed og-test-x402==0.0.9, updated og-test-v2-x402 from 0.0.6 to 0.0.9
pyproject.toml Same dependency changes as requirements.txt
examples/x402_permit2.py Removed network parameter from check_permit2_approval function
examples/run_x402_llm_stream.py Removed network variable and parameter from chat call
examples/run_x402_llm.py Removed network variable and parameter from chat call
docs/opengradient/index.md Updated default LLM server URLs in documentation
docs/opengradient/client/index.md Updated default LLM server URLs in documentation
docs/opengradient/client/client.md Updated default LLM server URLs in documentation
Makefile Consolidated chat-og-evm and chat-base-testnet targets into single chat target

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"""

async def make_request():
async def make_request_v2():
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function make_request() has been renamed to make_request_v2(), but the call site at line 153 still references make_request() which no longer exists. This will cause a NameError at runtime. The call at line 153 needs to be updated to asyncio.run(make_request_v2()).

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@adambalogh adambalogh merged commit a245fc7 into main Feb 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants